"""
报告导出工具
"""
from fpdf import FPDF
from typing import Dict, Any


class ReportExporter:
    """
    报告导出工具
    """
    def export_to_pdf(self, data: Dict[str, Any], file_path: str) -> str:
        """
        导出数据到 PDF 报告
        
        Args:
            data: 数据
            file_path: 导出路径
        """
        pdf = FPDF()
        pdf.add_page()
        pdf.set_font("Arial", size=12)
        
        for key, value in data.items():
            pdf.cell(200, 10, txt=f"{key}: {value}", ln=True)
        
        pdf.output(file_path)
        return file_path